<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
  <span>{{msg === num}}</span>
  {{list}}
  <input type="text">
  </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.min.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
  <script>
    const an = new Vue({
      el: '#app',
      data: {
       msg:'hello vue',
       num:1,
       list:''
      },
      beforeCreate() {
        console.log(this.msg,'===beforeCreate');
      },
      created() {
        console.log(this.msg,'===created')
        axios({
          url:'http://ajax-api.itheima.net/api/province'
        }).then(res=>{
          console.log(res);
          this.list = res.data.data
        })
        
      },
      beforeMount() {
        var dom = document.querySelector('span')
        dom.innerText='龚哥'
        console.log(dom,'===beforeNount');
      },
      
      mounted() {
        var dom = document.querySelector('span')
        dom.innerText='亮哥'
        console.log(dom,'===mounted');
        var dom = document.querySelector('input')
        dom.focus()
      },
      
    })
  </script>
</body>

</html>